<?php

namespace common\validate;

class TaskFile extends BaseValidate
{
    // 验证规则
    protected $rule = [];

    // 查询任务发布最新版本验证
    public function sceneGetLatestPublishedVersionByTaskId()
    {
        return $this->append('param', 'require|array')
            ->append('param.task_id', 'require');
    }

    // 参考文件自定义验证
    public function sceneGetReferenceFiles()
    {
        return $this->append('param', 'require|array')
            ->append('param.task_id', 'require');
    }

    // 上游文件自定义验证
    public function sceneGetUpstreamFileByTask()
    {
        return $this->append('param', 'require|array')
            ->append('param.task_id', 'require');
    }
}
